﻿package plugin.taskdialog
{
    import com.core.*;
    import com.sh.game.consts.*;
    import com.sh.game.global.*;
    import plugin.taskdialog.ui.*;
    import view.*;

    public class TaskDialog extends FlashUIBase
    {
        private var _ui:TaskDialogUICtrl;

        public function TaskDialog()
        {
            this.mAlphaShow = false;
            return;
        }// end function

        override protected function preLoaderInit() : void
        {
            super.preLoaderInit();
            appendLoader(Config.getUrl("assets/images/mornui/common.swf", ResourceType.NORMAL));
            return;
        }// end function

        override protected function initGUI() : void
        {
            this._ui = new TaskDialogUICtrl(close);
            this._ui.x = int(this.mContainer.stage.stageWidth / 2 + 80);
            this._ui.y = int(this.mContainer.stage.stageHeight / 2 - 320);
            mGUI = this._ui;
            return;
        }// end function

        override protected function openBefore() : void
        {
            ModelProxy.change("taskdialog", "show", data);
            this._ui.x = int(this.mContainer.stage.stageWidth / 2 + 80);
            this._ui.y = int(this.mContainer.stage.stageHeight / 2 - 320);
            return;
        }// end function

        override protected function openRefresh() : void
        {
            return;
        }// end function

    }
}
